Gradual Latent
https://github.com/kohya-ss/sd-scripts/tree/gradual_latent_hires_fixkohya-ss/sd-scripts by Kohya
latentのサイズを徐々に大きくしていくHires.fixです。sdxl_gen_img.py に以下のオプションが追加されています。
パラメータ
gradual_latent_timesteps (0)
latentのサイズを大きくし始めるタイムステップを指定します。
gradual_latent_ratio (0.5)
latentの初期サイズを指定します。
gradual_latent_ratio_step (0.125)
latentのサイズを大きくする割合を指定します。
gradual_latent_ratio_every_n_steps (3)
latentのサイズを大きくする間隔を指定します。
https://twitter.com/kohya_tech/status/1727696520571675091Kohya Tech
プロンプトにもよりますが、わりと適当な値でもまともに生成されます。Deep Shrinkより大人しい感じ。
設定は詰め切れていないですがランダムプロンプトでいくつか生成例を。1664x2632です。
https://gyazo.com/6168b84d9d14bbb3aacb7236b527880chttps://gyazo.com/efaf208aee449be7f39a5423576f9ad8https://gyazo.com/127d772414595030e9456ce5607705b8https://gyazo.com/e59ec05b5650092e720bc7eac7b6d263
実装
https://gist.github.com/laksjdjf/cf15ae37e27d2f0f9b3d978e6d05ec31laksjdjf/gradual_latent.py
https://gist.github.com/kohya-ss/ea09dac0632a2b4e61d78209c6033e74kohya-ss/gradual_latent.py
https://twitter.com/kohya_tech/status/1730367017889501566Kohya Tech
laksjdjf氏のComfyUI用Gradual Latentのnodeをforkして、unsharp maskを追加しました。
https://gyazo.com/470b885c941825f5607ab9c58b085f5a
関連
Deep Shrink Hires.fix